package com.sanji.sjmallmodule.order;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.sanji.sjmallapp.BaseActivity;
import com.sanji.sjmallapp.R;
import com.sanji.sjmallconfig.ConfigConts;
import com.sanji.sjmallmodule.main.MainActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 支付成功的信息
 */
public class PaySuccessMessageActivity extends BaseActivity implements View.OnClickListener {
    @BindView(R.id.continue_go_btn)
    Button continueGoBtn;
    @BindView(R.id.common_left_tv)
    TextView commonLeftTv;
    @BindView(R.id.common_back_img)
    ImageView commonBackImg;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay_success_message);
        ButterKnife.bind(this);
        continueGoBtn.setOnClickListener(this);
        initView();
    }

    public void initView() {
        commonLeftTv.setText(getString(R.string.title_pay));
        commonBackImg.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.continue_go_btn:
                Intent mIntent = new Intent(ConfigConts.ACTION_FRAGMENT_PAGER);
                mIntent.putExtra("index", 0);
                sendBroadcast(mIntent);
                intent = new Intent(this, MainActivity.class);
                startActivity(intent);
                break;
            case R.id.common_back_img:
                finish();
                break;
        }
    }
}
